<template>
  <!-- 城市条 -->
      <van-steps direction="vertical" :active="list.length-1">
          <van-step v-for="(item,key) in list" :key="key">
            <h3>{{ item.AcceptStation }}</h3>
            <p>{{ item.AcceptTime }}</p>
          </van-step>
      </van-steps>
</template>
<script setup>
  const {proxy} = getCurrentInstance()

  let orderid = proxy.$route.query.orderid ? proxy.$route.query.orderid : 0;
  let busid = proxy.$business.value.id;
  let list = ref([]);
  onMounted(()=>{
    expressInfo()
  })
  //默认方法
  const expressInfo= async()=>{
      //发送请求
      var result = await proxy.$POST({
        url:'/order/express',
        params:{orderid:orderid,busid:busid}
      })
      if(result.code==0){
        proxy.$fail({
          message: result.msg,
          onClose: () => proxy.$router.go(-1)
        })
        return false
      }
      list.value = result.data.Traces;
  }
</script>

